import styles from './index.module.scss'
import classNames from 'classnames'
import useSelect from '@renderer/hooks/useSelect'

export default function Result() {
  const { data, id, selectItemm } = useSelect()
  return (
    <div className={styles.root}>
      <main>
        {data.map((item) => (
          <div
            className={classNames('item', { active: id === item.id })}
            key={item.id}
            onClick={() => {
              selectItemm(item.id)
            }}
          >
            {item.title}
          </div>
        ))}
      </main>
    </div>
  )
}
